import request from '@/utils/request'

// 评论-获取评论列表
export const commentsListAPI = ({ aitId, offset = null, limit = 10 }) => {
  return request({
    url: '/v1_0/comments',
    params: {
      type: 'a',
      source: aitId,
      offset: offset,
      limit: limit

    }
  })
}
// 评论-喜欢
export const commentsLikeAPI = ({ target }) => {
  return request({
    url: '/v1_0/comment/likings',
    method: 'POST',
    data: {
      target
    }
  })
}
// 评论-不喜欢
export const commentsDisLikeAPI = ({ comId }) => {
  return request({
    url: `/v1_0/comment/likings/${comId}`,
    method: 'DELETE'
  })
}
// 评论-发布评论
export const sendCommentsAPI = ({ target, content }) => {
  return request({
    url: '/v1_0/comments',
    method: 'POST',
    data: {
      target,
      content

    }
  })
}
